package cn.czg.cms.service;

import cn.czg.cms.entity.Post;
import cn.czg.cms.entity.dto.PostDTO;
import cn.czg.cms.entity.dto.PostWithUser;
import cn.czg.cms.entity.req.PostCreateRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

public interface PostService extends IService<Post> {

    IPage<PostDTO> pageList(Double lng, Double lat, String order, String type, int current, int size, String searchKey);

    void updateLikeCount(String postId, int like);

    int createPost(PostCreateRequest postCreateRequest);

    IPage<PostWithUser> listByUser(Long userId, int pageNum, int pageSize);

    PostWithUser detail(String id);
}
